A Controlled Experiment in Maintenance Comparing Design Patterns to Simpler Solutions
نویسندگان
چکیده
Software design patterns package proven solutions to recurring design problems in a form that simpli es reuse. We are seeking empirical evidence whether using design patterns is bene cial. In particular, one may prefer using a design pattern even if the actual design problem is simpler than that solved by the pattern, i.e., if not all of the functionality o ered by the pattern is actually required. Our experiment investigates software maintenance scenarios that employ various design patterns and compares designs with patterns to simpler alternatives. The subjects were professional software engineers. In most of our nine maintenance tasks we found positive e ects from using a design pattern: either its inherent additional exibility was achieved without requiring more maintenance time or maintenance time was reduced compared to the simpler alternative. In a few cases we found negative e ects: the alternative solution was less error-prone or required less maintenance time. Although most of these e ects were expected, a few were surprising: a negative e ect occurs although a certain application of the Observer pattern appears to be well justi ed and a positive e ect occurs despite super uous exibility (and hence complexity) introduced by a certain application of the Decorator pattern. Overall, we conclude that unless there is a clear reason to prefer the simpler solution, it is probably wise to choose the exibility provided by the design pattern, because unexpected new requirements often appear. We identify several questions for future empirical research.
منابع مشابه
Documenting Design Patterns in Code Eases Program Maintenance
Software design patterns are a promising idea with many advocates. While subjective reports of their usefulness are available, scienti c proof is still missing. We consider the case of programmers using design pattern documentation (in the form of comments in the source program) during maintenance. Is such pattern documentation (PD) helpful for understanding a program more quickly and designing...
متن کاملTwo Controlled Experiments Assessing the Usefulness of Design Pattern Information During Program Maintenance
This paper reports on two controlled and repeatable experiments investigating whether software design patterns improve software quality and programmer productivity during software maintenance. Subjects performed maintenance tasks on two programs ranging from 360 to 560 LOC including comments. Both programs contained design patterns. The controlled variable was whether the design patterns were d...
متن کاملTwo Controlled Experiments Assessing the Usefulness of Design Pattern Documentation in Program Maintenance
ÐUsing design patterns is claimed to improve programmer productivity and software quality. Such improvements may manifest both at construction time (in faster and better program design) and at maintenance time (in faster and more accurate program comprehension). This paper focuses on the maintenance context and reports on experimental tests of the following question: Does it help the maintainer...
متن کاملThe supportive effect of patterns in architecture decision recovery - A controlled experiment
The documentation of software architectural design decisions is important to help people understand the system and the rationale behind architectural solutions. In practice, the documentation of such decisions is regularly done after the fact, or skipped completely. To support software maintenance and evolution, the decisions have to be recovered and described. This is often hindered by the fac...
متن کاملAnalyze the Effect of the Maintenance Activities on the Internet Sustainability by Using 2k Factorial Experiment Design
Nowadays, the internet and social networks become more popular than ever. People in all ages use the internet and communicate by that. One of the most terrible events in our daily life is to disconnect from the internet and lose the connections. It may also influence on the economics; so the sustainability in this area is necessary. Internet service provider companies are the executors of selli...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- IEEE Trans. Software Eng.
دوره 27 شماره
صفحات -
تاریخ انتشار 2001